import BackTop from "components/commen/backTop/BackTop";
import Bscroll from 'components/commen/bscroll/Bscroll'
import { POP, NEW, SELL } from "./const";

export const bscroll = {
  components: {
    Bscroll
  },
  methods: {
    contentScroll(position) {
      // console.log(position);
      this.isShow = position.y < -1000;
      this.tabappear = -(position.y - 40) >= this.tabOffestTop;
    },
  }
}

export const backTop = {
  components: {
    BackTop,
  },
  data() {
    return {
      isShow: false,
      tabappear: false,
      tabOffestTop: 0,
    }
  },

}
export const tabControlMixin = {
  data: function () {
    return {
      currentType: POP
    }
  },
  methods: {
    tabClick(index) {
      switch (index) {
        case 0:
          this.currentType = POP
          break
        case 1:
          this.currentType = NEW
          break
        case 2:
          this.currentType = SELL
          break
      }
      console.log(this.currentType);
    }
  }
}
